package com.haixiaoke.saas.repository.mapper;

import com.haixiaoke.saas.repository.dto.HousingAllocationDTO;
import com.haixiaoke.saas.repository.pojo.HousingAllocation;
import com.haixiaoke.saas.repository.vo.HousingAllocationVO;

import java.util.List;

/**
 * 房屋配置Mapper接口
 *
 * @author qixi
 * @date 2023-04-10
 */
public interface HousingAllocationMapper {
    /**
     * 查询房屋配置
     *
     * @param allocationId 房屋配置主键
     * @return 房屋配置
     */
    HousingAllocation selectHousingAllocationByAllocationId(Long allocationId);

    /**
     * 查询房屋配置列表
     *
     * @param housingAllocation 房屋配置
     * @return 房屋配置集合
     */
    List<HousingAllocation> selectHousingAllocationList(HousingAllocation housingAllocation);

    /**
     * 新增房屋配置
     *
     * @param housingAllocation 房屋配置
     * @return 结果
     */
    int insertHousingAllocation(HousingAllocation housingAllocation);

    /**
     * 修改房屋配置
     *
     * @param housingAllocation 房屋配置
     * @return 结果
     */
    int updateHousingAllocation(HousingAllocation housingAllocation);

    /**
     * 删除房屋配置
     *
     * @param allocationId 房屋配置主键
     * @return 结果
     */
    int deleteHousingAllocationByAllocationId(Long allocationId);

    /**
     * 批量删除房屋配置
     *
     * @param allocationIds 需要删除的数据主键集合
     * @return 结果
     */
    int deleteHousingAllocationByAllocationIds(Long[] allocationIds);

    int updateHousingAllocationState(HousingAllocation housingAllocation);

    HousingAllocation selectHousingAllocationByHouseId(String houseId);

    int checkHouseIdUnique(String houseId);

    List<HousingAllocationVO> selectHousingAllocationChooseHouse(HousingAllocationDTO dto);

    List<HousingAllocation> selectAllocationIds(List<Long> allocationIds);

    List<HousingAllocation> selectHousingAllocationByHouseIdIn(List<String> houseIds);

    void deleteHousingAllocationByHouseIdIn(List<String> houseIds);

    int updateHousingAllocationCleaningType(HousingAllocation allocation);

    int updateApartmentAllocation(HousingAllocation allocation);

    List<HousingAllocationVO> conditionList(HousingAllocationDTO dto);
}
